<template>
  <div >
    <!-- 基本信息 -->
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">需求信息</span>
    </div>
    <van-field readonly required name="importType" :value="fromdata.importType=='0'?'新增':fromdata.importType=='1'?'变更':'撤销'" label="需求类型:" label-width="5em" />
    <van-field readonly required name="oaname" :value="fromdata.oaname" label="需求提出人:" label-width="6em" />
    <van-field readonly required name="requestStatus" :value="fromdata.requestStatus" label="需求状态:" label-width="5em" />
    <van-field readonly required name="frontrequestcode" :value="fromdata.frontrequestcode" label="需求编码:" label-width="5em" />
    <van-field readonly required name="requestname" :value="fromdata.requestname" label="需求名称:" label-width="5em" autosize type="textarea" rows="1"/>
    <van-field readonly required name="isInvestment" :value="fromdata.isInvestment" label="是否为投资项目:" label-width="8em" />
    <van-field readonly required name="forecostamt" :value="fromdata.forecostamt" label="预计投资额(元):" label-width="8em" />
    <van-field readonly required name="templateCodeName" :value="fromdata.templateCodeName" label="模板编码:" label-width="5em" />
    <van-field readonly required name="cityCode" :value="fromdata.cityCode" label="需求提出单位:" label-width="7em" />
    <van-field readonly required name="cityName" :value="fromdata.cityName" label="需求提出单位名称:" label-width="9em" />
    <van-field readonly name="countryCode" :value="fromdata.countryCode" label="需求所在区域:" label-width="7em" autosize type="textarea" rows="1"/>
    <van-field readonly name="countryName" :value="fromdata.countryName" label="需求所在区域名称:" label-width="9em" />
    <van-field readonly name="totalName" :value="fromdata.totalName" label="期数/当年标签:" label-width="8em" />
    <van-field readonly name="grade" :value="fromdata.grade" label="评分:" label-width="3em" />
    <van-field readonly required name="firstInvestmentMajorName" :value="fromdata.firstInvestmentMajorName" label="一级投资专业名称:" label-width="9em" />
    <van-field readonly required name="secondInvestmentMajorName" :value="fromdata.secondInvestmentMajorName" label="二级投资专业名称:" label-width="9em" />
    <van-field readonly name="thirdInvestmentMajorName" :value="fromdata.thirdInvestmentMajorName" label="三级投资专业名称:" label-width="9em" />
    <van-field readonly required name="firstInvestmentMajorCode" :value="fromdata.firstInvestmentMajorCode" label="一级投资专业编码:" label-width="9em" />
    <van-field readonly required name="secondInvestmentMajorCode" :value="fromdata.secondInvestmentMajorCode" label="二级投资专业编码:" label-width="9em" />
    <van-field readonly name="thirdInvestmentMajorCode" :value="fromdata.thirdInvestmentMajorCode" label="三级投资专业编码:" label-width="9em" />
    <van-field readonly name="fourInvestmentMajorName" :value="fromdata.fourInvestmentMajorName" label="四级投资专业名称:" label-width="9em" />
    <van-field readonly name="projectItemName" :value="fromdata.projectItemName" label="项目集/项目子集名称:" label-width="10em" />
    <van-field readonly name="sourceSystem" :value="fromdata.sourceSystem" label="需求来源系统:" label-width="7em" />
    <van-field readonly name="buildPriority" :value="fromdata.buildPriority=='1'?'高':fromdata.buildPriority=='2'?'中':fromdata.buildPriority=='3'?'低':''" label="需求优先级:" label-width="6em" />
    <van-field readonly name="exceptOnlineDate" :value="fromdata.exceptOnlineDate" label="期望上线时间:" label-width="7em" />
    <van-field readonly required name="buildContentPms" :value="fromdata.buildContentPms" label="建设内容:" label-width="5em" autosize type="textarea" rows="1"/>
    <van-field readonly name="address" :value="fromdata.address" label="详细地址:" label-width="5em" autosize type="textarea" rows="1"/>
    <van-field readonly required name="remarkPms" :value="fromdata.remarkPms" label="备注:" label-width="3em" autosize type="textarea" rows="1"/>
    <van-field readonly required name="reserverData1" :value="fromdata.reserverData1" label="备用1:" label-width="4em" autosize type="textarea" rows="1"/>
    <van-field readonly required name="reserverData2" :value="fromdata.reserverData2" label="备用2:" label-width="4em" autosize type="textarea" rows="1"/>
    <van-field readonly required name="reserverData3" :value="fromdata.reserverData3" label="备用3:" label-width="4em" autosize type="textarea" rows="1"/>

    <van-field readonly required name="decisionMaterialFile" label="地市公司预立项决策材料：" label-width="13em" />
    <div v-for="(fileitem) in fromdata.decisionMaterialFile" :key="fileitem.id" style="margin-left:20px">
      <div readonly class="font14 fileLink" style="color:#0F85CF">
        <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
      </div>
    </div>
    <van-field readonly required name="decisionMeetingFile" label="地市公司预立项决策会议纪要：" label-width="14em" />
    <div v-for="(fileitem) in fromdata.decisionMeetingFile" :key="fileitem.id" style="margin-left:20px">
      <div readonly class="font14 fileLink" style="color:#0F85CF">
        <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
      </div>
    </div>
    <van-field readonly required name="proDecisionMaterialFile" label="省公司预立项决策材料：" label-width="13em" />
    <div v-for="(fileitem) in fromdata.proDecisionMaterialFile" :key="fileitem.id" style="margin-left:20px">
      <div readonly class="font14 fileLink" style="color:#0F85CF">
        <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
      </div>
    </div>
    <van-field readonly required name="proDecisionMeetingFile" label="省公司预立项决策会议纪要：" label-width="13em" />
    <div v-for="(fileitem) in fromdata.proDecisionMeetingFile" :key="fileitem.id" style="margin-left:20px">
      <div readonly class="font14 fileLink" style="color:#0F85CF">
        <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
      </div>
    </div>
    <van-field readonly required name="otherRequirementFile" label="其他需求审批文件：" label-width="13em" />
    <div v-for="(fileitem) in fromdata.otherRequirementFile" :key="fileitem.id" style="margin-left:20px">
      <div readonly class="font14 fileLink" style="color:#0F85CF">
        <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
      </div>
    </div>
    <div style="padding-bottom: 42px"></div>
  </div>
</template>
<script>
import { openFileUrl } from '@/store/openFile';
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      
    }
  },
  computed: {
    ...mapGetters(['user']),
  },
  props: ['businessdata','fromdata','showHistory','historydata','approveList','canEditbusinessName',],
  created() {
    
  },
  watch: {
    
  }, 
  methods: {
    openFileUrlfun(value) {
      this.$router.push(
          {
            name: 'fileview',
            query: {
              openFileUrl: openFileUrl(value)
            }
          }
      );
    }
  }
}
</script>
 
<style>
.tables.el-table .cell {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-all;
    line-height: 15px;
    padding-left: 5px;
    padding-right: 5px;
}
</style>